package com.touni.designpattern.singletonpattern.hungry;

/**
 * @ClassName : StaticInnerSingleton
 * @Description :静态内部类式实现
 * @Author : lwq
 * @Date: 2020-10-19 15:36
 */
public class StaticInnerSingleton {
    private static class staticInnerSingletonHolder{
        private static final StaticInnerSingleton staticInnerSingleton = new StaticInnerSingleton();
    }

    private StaticInnerSingleton(){}

    public static final StaticInnerSingleton getInstance(){
        return staticInnerSingletonHolder.staticInnerSingleton;
    }

}
